<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Saleenauto IT</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Font Awesome -->
   <link rel="stylesheet" href="{{ url_for('static',filename='dist/css/all.css') }}">
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- Tempusdominus Bbootstrap 4 -->
  <link rel="stylesheet" href="plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
  <!-- iCheck -->
  <link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css">
  <!-- JQVMap -->
  <link rel="stylesheet" href="plugins/jqvmap/jqvmap.min.css">
  <!-- Theme style -->
 <link rel="stylesheet" href="{{ url_for('static',filename='dist/css/adminlte.min.css') }}">
  <link rel="stylesheet" href="dist/css/adminlte.min.css">
  <!-- overlayScrollbars -->
  <link rel="stylesheet" href="plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
  <!-- Daterange picker -->
  <link rel="stylesheet" href="plugins/daterangepicker/daterangepicker.css">
  <!-- summernote -->
  <link rel="stylesheet" href="plugins/summernote/summernote-bs4.css">
  <!-- Google Font: Source Sans Pro -->
  <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body class="hold-transition sidebar-mini layuser2-160x160.jpgout-fixed">
<div class="wrapper">

  <!-- Navbar -->
  <nav class="main-header navbar navbar-expand navbar-white navbar-light">
    <!-- Left navbar links -->
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
      </li>

    </ul>

    <!-- SEARCH FORM -->
    <form class="form-inline ml-3" action="{{ url_for('search') }}">
      <div>
        <input type="text" name="q" class="form-control form-control-navbar" type="search" placeholder="Search" aria-label="Search">
          <button type="submit" class="btn btn-default">Search</button>
        </div>
    </form>

    <!-- Right navbar links -->
    <ul class="navbar-nav ml-auto">
                      <li class="nav-item dropdown">
                  <script LANGUAGE="JavaScript">
function opechs(){window.open ("{{ url_for('chs') }}", "newwindow", "height=50, _blank, _width=20, toolbar=0, hanaprd2=0,menubar=0, scrollbars=0, resizable=0, location=0, status=no")
}
</script>
       <a class="nav-link" data-toggle="dropdown" onclick="opechs()">
          <span class="glyphicon glyphicon-wrench" style="color: rgb(10, 140, 60);">修改密码</span>
        </a>
              </li>
              <li class="nav-item dropdown">
<script LANGUAGE="JavaScript">
function openwin(){window.open ("{{ url_for('add') }}", "newwindow", "height=500, _blank, _width=100, toolbar=0, hanaprd2=0,menubar=0, scrollbars=0, resizable=0, location=0, status=no")
}
</script>
       <a class="nav-link" data-toggle="dropdown" onclick="openwin()">
          <span class="glyphicon glyphicon-plus" style="color: rgb(10, 140, 60);">新增</span>
        </a>
              </li>
      <!-- Messages Dropdown Menu -->
      <li class="nav-item dropdown">
        <a class="nav-link" data-toggle="dropdown" href={{ url_for('logout') }}>
            <span class="glyphicon glyphicon-log-out" style="color: rgb(255, 140, 60);">退出</span>
        </a>
        <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
          <a href="#" class="dropdown-item">
            <!-- Message Start -->
            <div class="media">
              <img src="dist/img/user1-128x128.jpg" alt="User Avatar" class="img-size-50 mr-3 img-circle">
            </div>
            <!-- Message End -->
          </a>
          <div class="dropdown-divider"></div>
          <a href="#" class="dropdown-item">
            <!-- Message Start -->
            <div class="media">
              <img src="dist/img/user8-128x128.jpg" alt="User Avatar" class="img-size-50 img-circle mr-3">

            </div>
            <!-- Message End -->
          </a>
          <div class="dropdown-divider"></div>
          <a href="#" class="dropdown-item">
            <!-- Message Start -->
            <div class="media">
              <img src="dist/img/user3-128x128.jpg" alt="User Avatar" class="img-size-50 img-circle mr-3">
              <div class="media-body">
                <h3 class="dropdown-item-title">
                  Nora Silvester
                  <span class="float-right text-sm text-warning"><i class="fas fa-star"></i></span>
                </h3>
                <p class="text-sm">The subject goes here</p>
                <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p>
              </div>
            </div>
            <!-- Message End -->
          </a>
      </li>
      <!-- Notifications Dropdown Menu -->
      <li class="nav-item dropdown">
        <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
          <div class="dropdown-divider"></div>
          <a href="#" class="dropdown-item">
            <i class="fas fa-envelope mr-2"></i> 4 new messages
            <span class="float-right text-muted text-sm">3 mins</span>
          </a>
          <div class="dropdown-divider"></div>
          <a href="#" class="dropdown-item">
            <i class="fas fa-users mr-2"></i> 8 friend requests
            <span class="float-right text-muted text-sm">12 hours</span>
          </a>
          <div class="dropdown-divider"></div>
          <a href="#" class="dropdown-item">
            <i class="fas fa-file mr-2"></i> 3 new reports
            <span class="float-right text-muted text-sm">2 days</span>
          </a>
          <div class="dropdown-divider"></div>
          <a href="#" class="dropdown-item dropdown-footer">See All Notifications</a>
        </div>
      </li>
      <li class="nav-item">
        <a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#">
          <i class="fas fa-th-large"></i>
        </a>
      </li>
    </ul>
  </nav>
  <!-- /.navbar -->

  <!-- Main Sidebar Container -->
  <aside class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Brand Logo -->
    <a href={{ url_for('index') }} class="brand-link">
      <span class="brand-text font-weight-light"><h3>Saleenatuo</h3></span>
    </a>

    <!-- Sidebar -->
    <div class="sidebar">
      <!-- Sidebar user panel (optional) -->



      <!-- Sidebar Menu -->
      <nav class="mt-2">
        <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
          <!-- Add icons to the links using the .nav-icon class
               with font-awesome or any other icon font library -->



     <li class="nav-header">设备信息</li>
      <li class="nav-item has-treeview menu-open">
          <li class="nav-item">
            <a href={{ url_for('server') }} class="nav-link">
              <i class="nav-icon fas fa-th"></i>
              <p>
                服务器
                <span class="right badge badge-danger"></span>
              </p>
            </a>
          </li>
           <li class="nav-item">
            <a href={{ url_for('networks') }} class="nav-link">
              <i class="nav-icon fas fa-th"></i>
              <p>网络类<span class="right badge badge-danger"></span>
              </p>
            </a>
          </li>
                       <li class="nav-item">
            <a href={{ url_for('pc') }} class="nav-link">
              <i class="nav-icon fas fa-th"></i>
              <p>
                电脑类
                <span class="right badge badge-danger"></span>
              </p>
            </a>
          </li>
            <li class="nav-item">
            <a href={{ url_for('other') }} class="nav-link">
              <i class="nav-icon fas fa-th"></i>
              <p>其它<span class="right badge badge-danger"></span>
              </p>
            </a>
          </li>
     <li class="nav-header">系统操作</li>
     <li class="nav-item">
            <a href={{ url_for('other') }} class="nav-link">
              <i class="nav-icon fas fa-th"></i>
            <p>日志查询</p>
            </a>
          </li>
        </ul>
      </nav>
      <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
  </aside>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->

    <!-- /.content-header -->

    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
        <!-- Small boxes (Stat box) -->
        <div class="row">
             <div class="col-lg-3 col-6">
            <!-- small box -->
            <div class="small-box bg-success">
              <div class="inner">
                <h3>65</h3>
                <h3>服务器</h3>
              </div>
              <div class="icon">
                <i class="ion ion-pie-graph"></i>
              </div>
              <a href="#" class="small-box-footer"></a>
            </div>
          </div>

          <!-- ./col -->
          <div class="col-lg-3 col-6">
            <!-- small box -->
            <div class="small-box bg-danger">
              <div class="inner">
                <h3>65</h3>
                <h3>办公电脑</h3>
              </div>
              <div class="icon">
                <i class="ion ion-pie-graph"></i>
              </div>
            </div>
          </div>
          <!-- ./col -->

           <div class="col-lg-3 col-6">
            <div class="small-box bg-info">
              <div class="inner">
                <h3>65</h3>
                <h3>网络设备</h3>
              </div>
              <div class="icon">
                <i class="ion ion-pie-graph"></i>
              </div>
            </div>
           </div>

          <!-- ./col -->
          <div class="col-lg-3 col-6">
            <div class="small-box bg-warning">
              <div class="inner">
                <h3>65</h3>
                <h3>其它类</h3>
              </div>
              <div class="icon">
                <i class="ion ion-pie-graph"></i>
              </div>
            </div>
          </div>
        </div>
        <div class="row">
<table id="example2" class="table table-bordered table-hover">

              <table id="example2" class="table table-bordered table-hover" table-layout=fixed; width=100%>
                <thead>
                <tr>
                <th>ID</th>
                 <td style="width: 8%">状态</td>
                            <td>主机名</td>
                            <td>环境</td>
                            <td>类型</td>
                            <td>位置</td>
                            <td>IP信息</td>
                            <td>应用</td>
                            <td>使用者</td>
                            <td>备注</td>
                            <td>操作</td>
                </tr>
                </thead>
                <tfoot>
                   {% for row in deviceslist %}
                        <tr style="margin-top: 10%">
                            <th><h>{{ row['id'] }}</h></th>
                            <th><h>{{ row['status'] }}</h></th>
                            <th>{{ row['hostname'] }}</th>
                            <th>{{ row['zone'] }}</th>
                            <th>{{ row['type'] }}</th>
                            <th>{{ row['locational'] }}</th>
                            <th>{{ row['lanip' ]}}
                            <th>{{ row['app'] }}</th>
                            <th>{{ row['enduser'] }}</th>
                            <th>{{ row['other'] }}</th>
                            <th>
            <a href="/delete/{{ row['id'] }}"><span class="glyphicon glyphicon-remove"
                                                                       style="color: rgb(198, 14, 0); font-size: 20px"></span></a>
           <a href="#" onclick="javascript:window.open('/update/{{ row['id']}}','','height=800px,width=380,top=30,left=30,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')">
                                    <span class="glyphicon glyphicon-pencil" style="color: rgb(20, 132, 0); font-size: 20px"></span>
                                </a>
                            </th>
                        </tr>
                   {% endfor %}



                </tfoot>
              </table>

          </section>
        </div>
      </div><!-- /.container-fluid -->
    </section>
  </div>
  <!-- /.content-wrapper -->
  <footer class="main-footer">
    <strong>1983-2019 Saleenauto IT</a>.</strong>
    All rights reserved.
    <div class="float-right d-none d-sm-inline-block">
      <b>Version</b> 1.0.0
    </div>
  </footer>

  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
  </aside>
  <!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<!--

</body>
</html>
